<?php
class View extends ArrayObject {
	
	public function __construct() {
		parent::__construct ( array (), ArrayObject::ARRAY_AS_PROPS );
	}
	
	public function render($file, $data = "",$rollback=false) {
		ob_start ();
		if($rollback)
			include('views/rollback.php');
		include ('views/' . $file);
		ob_end_flush ();
	}
	
	public function render_in_layout($file, $data="") {
		ob_start ();
		include ('views/layout.php');
		ob_end_flush ();
	}
}